package com.superteam.zzl.Des;

import android.support.v4.app.FragmentManager;

import com.superteam.zzl.activity.MainActivity;
import com.superteam.zzl.activity.R;

import java.util.ArrayList;

/**
 * Created by Administrator on 2017/1/7.
 */
public class FragmentCotroller {
    int containerId;
    public FragmentManager fm;
    private static FragmentCotroller controller;
    private ArrayList<BaseFragment> fragments;
    public String[] title;

    public FragmentCotroller(int containerId,MainActivity mainActivity) {
        this.containerId = containerId;
        fm = mainActivity.getSupportFragmentManager();
        title = mainActivity.getResources().getStringArray(R.array.native_main);
        initFragment();

    }

    private void initFragment() {
        fragments=new ArrayList<>();
      //  fragments.add();
    }

    public static FragmentCotroller getInstance(int containerId, MainActivity mainActivity) {
        if (controller == null) {
            controller = new FragmentCotroller(containerId,mainActivity);
        }
        return controller;
    }
}
